string split and join hackerrank solution

visit shbcf.ru